package com.rst.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

@Entity
@Table(name="t_exam_scores")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class ExamScore {
	
	public static final int ACTIVE = 1;
	public static final int INACTIVE = 0;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name="f_id")
	private Long id;	
	
	@Column(name="f_status")
	private Integer status;
	
	@Column(name="f_student_id")
	private Long studentId;

	@Column(name="f_exam_id")
	private Long examId;
	
	@Column(name="f_marks") 
	private Double marks;
	
	@Column(name="f_grading_level_id")
	private Long gradingLevelId;
	
	@Column(name="f_remarks")
	private String remarks;
	
	@Column(name="f_created_at")
	private Date createdAt;
	
	@Column(name="f_updated_at")
	private Date updatedAt;

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="f_student_id", nullable=false, insertable=false, updatable=false)
	private Student student;

	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Long getStudentId() {
		return studentId;
	}

	public void setStudentId(Long studentId) {
		this.studentId = studentId;
	}

	public Long getExamId() {
		return examId;
	}

	public void setExamId(Long examId) {
		this.examId = examId;
	}

	public Double getMarks() {
		return marks;
	}

	public void setMarks(Double marks) {
		this.marks = marks;
	}

	public Long getGradingLevelId() {
		return gradingLevelId;
	}

	public void setGradingLevelId(Long gradingLevelId) {
		this.gradingLevelId = gradingLevelId;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}	


}
